import request from "../../api/request";
const market = "market";

// 获取表单
export function initAllAccInfo(data) {
  return request({
    url: market + "/indAccInfoAction/initAllAccInfo",
    method: "post",
    data: data || {}
  });
}

// 新增
export function save(data) {
  return request({
    url: market + "/indAccInfoAction/save",
    method: "post",
    data: data || {}
  });
}

// 修改
export function update(data) {
  return request({
    url: market + "/indAccInfoAction/update",
    method: "post",
    data: data || {}
  });
}

// 删除
export function remove(params) {
  return request({
    url: market + "/indAccInfoAction/remove",
    method: "delete",
    data: params
  });
}

//  查看用户已经绑定卡
export function getCardByAccId(data) {
  return request({
    url: market + "/indAccInfoAction/getCardByAccId",
    method: "post",
    data: data || {}
  });
}

//  查看用户已经绑定车辆
export function getEvByAccId(data) {
  return request({
    url: market + "/indAccInfoAction/getEvByAccId",
    method: "get",
    params: data || {}
  });
}

// 客户管理绑定车辆
export function saveAccEvRela(data) {
  return request({
    url: market + "/indAccInfoAction/saveAccEvRela",
    method: "post",
    data: data || {}
  });
}
// 客户管理解绑车辆
export function updateAccEvRela(data) {
  return request({
    url: market + "/indAccInfoAction/updateAccEvRela",
    method: "post",
    data: data || {}
  });
}
// 收藏站点
export function initAllCollection(data) {
  return request({
    url: market + "/indAccInfoAction/initAllCollection",
    method: "post",
    data: data || {}
  });
}
// 用户解绑卡
export function updateAllCard(data) {
  return request({
    url: market + "/card/updateAllCard",
    method: "post",
    data: data || {}
  });
}

// 卡号模糊查询
export function queryAccIsNullCardList(cardNo) {
  return request({
    url: market + `/card/queryAccIsNullCardList/${cardNo}`,
    method: "get",
    // headers: {
    //     'Content-Type': 'application/json'
    // },
    // params: data || {}
  });
}

// 充值记录导出
export function exportCard(data) {
  return request({
    url: market + "/card/exportCard",
    method: "post",
    data: data || {}
  });
}

// 消费记录导出
export function exportPay(data) {
  return request({
    url: market + "/card/exportPay",
    method: "post",
    data: data || {}
  });
}

// 退款记录导出
export function exportRefund(data) {
  return request({
    url: market + "/card/exportRefund",
    method: "post",
    data: data || {}
  });
}
// 集团文件新增
export function saveGroup(data) {
  return request({
    url: market + "/indAccInfoAction/saveGroup",
    method: "post",
    data: data || {}
  });
}
// 校验
export function check(data) {
  return request({
    url: market + "/indAccInfoAction/check",
    method: "post",
    data: data || {}
  });
}
// 表单导出
export function exportClient(data) {
  return request({
    url: market + "/indAccInfoAction/exportClient",
    method: "post",
    data: data || {}
  });
}
// 子运营商导出接口
export function exportChargByOrgId(data) {
  return request({
    url: "/charge/chagRecCY/exportChargByOrgId",
    method: "post",
    data: data || {}
  });
}
